#ifndef _VIDEO_SVR_H
#define _VIDEO_SVR_H

#include "base.h"

#define GM_MAINSTREAM 3
#define GM_SUBSTREAM 2

class CVideo_svr
{
public:
	CVideo_svr(LPST_ENV_T pEnv, int nCh);
	virtual ~CVideo_svr();
private:
	static void* cbThreadFunc(void* pParam){((CVideo_svr*)pParam)->EncThreadFunc();return NULL;};
	void EncThreadFunc();
	void PutFrameToMem(int nStreamID, gm_enc_bitstream_t *pBs);
private:
	LPST_ENV_T m_pEnv;
	int m_nChId;
	pthread_t m_thread_id;
	void *m_groupfd[MAX_V_BITSTREAM_NUM];
	void *m_main_bindfd, *m_sub_bindfd;
	void *m_main_capture_object, *m_sub_capture_object;
	void *m_main_enc_object, *m_sub_enc_object;
	ST_VIDEO_MEM_T m_video_mem[MAX_V_BITSTREAM_NUM];

	LPST_CH_PARAM m_pChParam;
};

#endif
